<!-- include tpl=head title=订单明细 -->
<script type="text/javascript">
function order_payment(orderid,passwd)
{
	if(passwd && passwd != 'undefined'){
		var url = get_url('order','payment','sn='+orderid+"&passwd="+passwd);
	}else{
		var url = get_url('order','payment','id='+orderid);
	}
	$.phpok.go(url);
}
</script>
<div class="am-panel-group am-margin-xs">
	<div class="am-panel am-panel-default">
		<div class="am-panel-hd">订单基本信息</div>
		<ul class="am-list am-list-static am-list-striped">
			<li>订单编号：{$rs.sn}</li>
			<li>下单时间：{func time_format $rs.addtime}</li>
			<li>订单金额：{func price_format $rs.price $rs.currency_id}</li>
			<li>订单状态：{$rs.status_info}</li>
			<!-- if $rs.email -->
			<li>　　邮箱：{$rs.email}</li>
			<!-- /if -->
			<!-- if $rs.mobile -->
			<li>　手机号：{$rs.mobile}</li>
			<!-- /if -->
			<!-- loop from=$rs.ext key=$key value=$value id=$tmpid -->
			<li>{$key}：{$value}</li>
			<!-- /loop -->
			<!-- if $rs.note -->
			<li>　　备注：{func nl2br $rs.note}</li>			
			<!-- /if -->
		</ul>
	</div>
	
	<!-- if $address -->
	<div class="am-panel am-panel-default">
		<div class="am-panel-hd">收件人信息</div>
		<ul class="am-list am-list-static">
			<li>姓名：{$address.fullname}</li>
			<li>地址：{$address.province}
						<!-- if $address.province != $address.city -->
						{$address.city}
						<!-- /if -->
						{$address.county}
						{$address.address}<!-- if $address.zipcode --><i>（邮编：{$address.zipcode}）</i><!-- /if -->
			</li>
			<!-- if $address.tel --><li>电话：{$address.tel}</li><!-- /if -->
			<!-- if $address.mobile --><li>手机：{$address.mobile}</li><!-- /if -->
			<!-- if $address.email --><li>邮箱：{$address.email}</li><!-- /if -->
		</ul>
	</div>
	<!-- /if -->
	<div class="am-panel am-panel-default">
		<div class="am-panel-hd">产品信息</div>
		<table class="am-table am-table-centered">
			<thead>
				<tr>
					<th>图片</th>
					<th class="am-text-left">产品信息</th>
				</tr>
			</thead>
			<tbody>
				<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
				
				<tr>
					<td>
						<!-- if $value.thumb && file_exists($value.thumb) -->
						<img src="{$value.thumb}" width="80" height="80" border="0" />
						<!-- else -->
						<img src="{#images#}/blank.gif" width="80" height="80" border="0" />
						<!-- /if -->
					</td>
					<td class="am-text-left">
						<div><b>{$value.title}</b></div>
						<!-- loop from=$value.ext key=$k value=$v id=$tmpid -->
						<div>{$v.title}：{$v.content}</div>
						<!-- /loop -->
						<div>单价：{func price_format $value.price $rs.currency_id $rs.currency_id}</div>
						<div>数量：{$value.qty}</div>
						<div>售价：{func price_format $value.price*$value.qty $rs.currency_id $rs.currency_id}</div>
					</td>
				</tr>
				<!-- /loop -->
			</tbody>
		</table>
	</div>

	<div class="am-panel am-panel-default">
		<div class="am-panel-hd">价格明细</div>
		
		<ul class="am-list am-list-static am-list-striped">
			<!-- loop from=$pricelist key=$key value=$value id=$tmpid -->
			<li>{$value.title}：{$value.price}</li>
			<!-- /loop -->
			<li>总价：{func price_format $rs.price $rs.currency_id $rs.currency_id}</li>
		</ul>
	</div>
	<!-- if $loglist -->
	<div class="am-panel am-panel-default">
		<div class="am-panel-hd">订单日志</div>
		<table class="am-table am-table-hover">
			<tbody>
				<!-- loop from=$loglist key=$key value=$value id=$tmpid -->
				<tr>
					<td class="am-text-left">
						<div>{$value.note}</div>
						<div>时间：{func time_format $value.addtime}</div>
						<!-- if $value.who --><div>操作人：{$value.who}</div><!-- /if -->
					</td>
				</tr>
				<!-- /loop -->
			</tbody>
		</table>
	</div>
	<!-- /if -->
</div>


<!-- if !$pay_end -->
<div class="am-margin-sm">
	<!-- if $session.user_id -->
	<a href="{url ctrl=order func=payment id=$rs.id/}" class="am-btn am-btn-block am-btn-primary">在线支付</a>
	<!-- else -->
	<a href="{url ctrl=order func=payment sn=$rs.sn passwd=$rs.passwd/}" class="am-btn am-btn-block am-btn-primary">在线支付</a>
	<!-- /if -->
</div>
<!-- /if -->

<!-- include tpl=foot -->